package com.d2rv.model;

import com.d2rv.offscreen.OffScreen3D;
import java.io.File;
import processing.core.PApplet;
import processing.core.PVector;

/**
 * This class is the manager of the class ArrowModel
 * @author Darrieutort A., Dupouy A., Rossignol L., Van Poucke A.
 */
public class ArrowModelManager {

    private ArrowModel arrowmodel;

    /**
     * Default constructor.
     * @param parent The current application
     */
    public ArrowModelManager(PApplet parent) {
        this.arrowmodel = new ArrowModel(parent, parent.dataPath("models" + File.separator + "arrow" + File.separator + "arrow.obj"), new PVector(10, 10, 0));
        this.arrowmodel.scale(new PVector(0.2f, 0.2f, 0.2f));
    }

    /**
     * Triggers the draw method of the object
     * @param parent The current offscreen 
     * @param angleTarget The angle of rotation of the model
     */
    public void drawArrow(OffScreen3D parent, float angleTarget) {
        this.arrowmodel.draw(parent, angleTarget);
    }

    /**
     * Returns the object arrowModel
     * @return the arrowModel
     */
    public ArrowModel arrowmodel() {
        return this.arrowmodel;
    }
}